<template>
  <div id="app">
    <my-button @fatherClick="del()">删除</my-button>
    <form action="http://www.lucklnk.com" target="_blank">
      <my-button type="submit" style="background-color: #ff0000"
        >提交</my-button
      >
    </form>
  </div>
</template>

<script>
import Vue from "vue";
import Button from "./components/button";
import Confirm from "./components/confirm";
Vue.use(Button);
Vue.use(Confirm);
export default {
  name: "app",
  data() {
    return {};
  },
  components: {},
  created() {},
  methods: {
    del() {
      this.$confirm("确认要删除吗？", [
        {
          text: "取消",
          onPress: () => {
            console.log("取消");
          },
        },
        {
          text: "确认",
          onPress: () => {
            console.log("确认删除");
          },
        },
      ]);
    },
  },
};
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
</style>
